package com.honey.mybatis.generator.criteria;

import com.honey.compilation.java.AbstractJavaCompilation;
import com.honey.compilation.java.ClassDecoration;
import com.honey.compilation.java.JavaVisibility;
import com.honey.core.compiler.CompilationException;
import com.honey.core.dbmapping.introspect.IntrospectSchema;
import com.honey.core.dbmapping.introspect.IntrospectSchemaColumn;
import com.honey.core.types.FullyQualifiedJavaType;
import com.honey.mybatis.generator.AbstractClass;
import com.honey.mybatis.generator.MybatisPlugin;

public class GeneratedCriteriaClass  extends AbstractClass{

	private static final String []ANNOTATION = new String[]{
			"@SuppressWarnings(\"unchecked\")",
	};
	
	private static final String []JAVA_DOC = new String[]{
		"动态查询条件。",
	};

	protected GeneratedCriteriaClass(
			MybatisPlugin belongPlugin,
			IntrospectSchema introspectSchema,
			IntrospectSchemaColumn introspectSchemaColumn
			) {
		super(belongPlugin,introspectSchema,introspectSchemaColumn);
	}
	
	@Override
	protected AbstractJavaCompilation getAbstractJavaCompilation() throws CompilationException {
		
		com.honey.compilation.java.AbstractClass answer = null;
		FullyQualifiedJavaType type = new FullyQualifiedJavaType(mybatisPlugin.getModelTargetPackage(),CriteriaConstant.GENERATED_CRITERIA_CLASS_NAME+"<T extends "+CriteriaConstant.GENERATED_CRITERIA_CLASS_NAME+"<?, ?>,F extends Enum<?>>");
		answer = new com.honey.compilation.java.AbstractClass(type, new ClassDecoration(JavaVisibility.PUBLIC,false,false));
			
		return answer;
	}
	
	@Override
	protected FullyQualifiedJavaType getType() {
		return null;
	}
	
	@Override
	protected String[] getAnnotation() {
		
		return ANNOTATION;
	}
	
	@Override
	protected String[] getJavaDoc() {
		return JAVA_DOC;
	}
}
